﻿<%@ Page Title="Database manager" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DatabaseManager.aspx.cs" Inherits="Apollo.Website.DatabaseManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#chkAll").click(function () {
                var checkedAll = $("#chkAll").attr('checked');
                $(".runCss :checkbox").attr('checked', checkedAll);
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" Runat="Server">

        <div class="ui-state-hover">
            <div id="entity_menu" class="center-menu">
                <span><asp:LinkButton runat="server" Text="Run scripts" onclick="ButtonSave_Click" CssClass="btn_run" /></span>
                
            </div>
            <div class="clear"></div>
        </div>
    
        <div id="entity_header" class="ui-state-highlight" runat="server" visible="false">
            <asp:Image ID="ImageWarn" runat="server" ImageUrl="/css/icons/icon_40.png" Visible="false"/>
            <asp:Label ID="LabelWarn" runat="server" Text="Tables were generated" CssClass="warn" Visible="false"></asp:Label>
        </div>
        
        <div class="ui-state-default ui-jqgrid-hdiv">
            <div class="ui-jqgrid-hbox">
                <table class="ui-jqgrid-htable" width="100%">
                    <tr>
                        <th class="ui-state-default ui-th-column ui-th-ltr"><input type="checkbox" id="chkAll" /></th>
                        <th class="ui-state-default ui-th-column ui-th-ltr ui-jqgrid">Scripts</th>
                    </tr>
                    <asp:Repeater ID="RepeaterSQLScripts" runat="server" 
                        onitemdatabound="RepeaterSQLScripts_ItemDataBound">
                    <ItemTemplate>
                    <tr class="ui-widget-content jqgrow ui-row-ltr">
                        <td><asp:CheckBox ID="CheckBoxRunSQL" runat="server" CssClass="runCss" /></td>
                        <td class="ui-jqgrid">
                            <asp:Label ID="LabelSQL" runat="server" Text="Label"></asp:Label>
                            <asp:HiddenField ID="HiddenFieldSQL" runat="server" />
                        </td>
                    </tr>
                    </ItemTemplate>
                    </asp:Repeater>
                </table>    
            </div>
        </div>
        

</asp:Content>

